<template>
  <div class="weather-main">
    <div class="left">
      <div class="buttons">
        <div class="bg1">今日</div>
        <div class="bg2">预报</div>
      </div>
      <div class="imgs">
        <img src="../assets/img/qing.png" alt />
        <div class="font28">晴</div>
        <div class="qw">4℃ - 11℃</div>
        <div class="font28">无持续风向＜3级</div>
      </div>
    </div>
    <div class="right">
      <div class="buttons">
        <div>未来7天趋势</div>
        <div class="bg1">温度</div>
        <div class="bg2">降水量</div>
        <div class="bg1">风力风向</div>
      </div>
      <div class="tqzxt">
        <TqCharts :tqArr="tqArr" />
      </div>
    </div>
  </div>
</template>

<script>
import TqCharts from "./TqCharts.vue";
export default {
  name: "TqPage",
  components: {
    TqCharts
  },
  data() {
    return {
      tqArr: [
        {
          date: "2/16",
          text: "多云",
          dw: 4,
          gw: 11,
          fl: "3-4级"
        },
        {
          date: "2/17",
          text: "多云",
          dw: 5,
          gw: 13,
          fl: "1-3级"
        },
        {
          date: "2/18",
          text: "多云",
          dw: 8,
          gw: 14,
          fl: "1-3级"
        },
        {
          date: "2/19",
          text: "晴",
          dw: 3,
          gw: 15,
          fl: "2-4级"
        },
        {
          date: "2/20",
          text: "晴",
          dw: 4,
          gw: 15,
          fl: "1-3级"
        },
        {
          date: "2/21",
          text: "晴",
          dw: 2,
          gw: 10,
          fl: "3-4级"
        },
        {
          date: "2/22",
          text: "阴",
          dw: 2,
          gw: 9,
          fl: "2-4级"
        }
      ]
    };
  }
};
</script>
<style lang="less" scoped>
.weather-main {
  width: 100%;
  height: 100%;
  padding: 5px;
  display: flex;
  color: #fff;
  .left {
    display: flex;
    height: 100%;
    flex-direction: column;
    width: 22%;
    padding: 4px 0;
    justify-content: space-between;
    .imgs {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-around;
      color: #fff;
      img {
        width: 100px;
      }
      flex: 1;
      .qw {
        font-size: 16px;
        font-weight: 600;
      }
      .font28 {
        font-size: 14px;
      }
      div {
        text-align: center;
        padding: 4px 0;
      }
    }
    .buttons {
      display: flex;
      justify-content: space-around;
      font-size: 14px;
      div {
        padding: 2px 4px;
      }
      .bg1 {
        background: #169bd5;
      }
      .bg2 {
        background: #0649d7;
      }
    }
  }
  .right {
    flex: 1;
    display: flex;
    padding: 4px 10px 4px 4px;
    flex-direction: column;
    .buttons {
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      div {
        padding: 2px 4px;
      }
      .bg1 {
        background: #169bd5;
      }
      .bg2 {
        background: #0649d7;
      }
    }
    .tqzxt {
      flex: 1;
      padding: 8px;
      // padding: 30px;
      // border: 1px solid #265CFF;
    }
  }
}
</style>
